
<div class="layui-form-item">
    <div class="layui-input-block">
      <span>
			请到<a target="_blank" href="http://www.kuaidi100.com/openapi/applyapi.shtml"> 快递100 </a>申请身份key
	  </span>
    </div>
</div>

<div class="layui-form-item">
    <label class="layui-form-label">用户</label>
    <div class="layui-input-inline demowhj">
      <select name="user" id="user" lay-verify="" class="inputSelect" lay-filter="">
        <option value="0" <#if user == '0'>selected</#if>>普通用户</option>
        <option value="1" <#if user == '1'>selected</#if>>企业用户</option>
      </select>
    </div>
  </div>
<div class="layui-form-item" id="discode">
    <label class="layui-form-label">公司代码</label>
    <div class="layui-input-inline">
      <input type="text" name="code" id="code" value="${code!''}"   maxlength="40" autocomplete="off" class="layui-input">
    </div>
 </div>
 <div class="layui-form-item">
    <label class="layui-form-label">id</label>
    <div class="layui-input-inline">
      <input type="text" name="keyid" id="keyid" value="${keyid!''}" required  lay-verify="required"  maxlength="30" autocomplete="off" class="layui-input">
    </div>
 </div>

<script>
var index = parent.layer.getFrameIndex(window.name);

layui.use(['form', 'layedit', 'laydate'], function(){
    var form = layui.form()
        ,layer = layui.layer
        ,layedit = layui.layedit
        ,laydate = layui.laydate;

    form.on('select()', function(data){  
	       
		if(data.value == 0){
			$("#discode").hide(); 
		}else{
			$("#discode").show();
		}	
	});   
});

$(function() {
	if($("#user").val() == 0){
		$("#discode").hide(); 
	}
})
</script>